//
//  GeofenceInfo.m
//  location
//
//  Created by Dongxiang Xu on 2024/6/6.
//

#import "GeofenceInfo.h"

@implementation GeofenceInfo

- (instancetype)initWithDictionary:(NSDictionary *)dict {
    self = [super init];
    if (self) {
        self.fenceId = [NSString stringWithFormat:@"%@",dict[@"id"]];
        self.fenceName = dict[@"name"];
        self.radius = [dict[@"radius"] doubleValue];
        self.code = [[dict[@"code"] lastObject] integerValue];        
        self.center = CLLocationCoordinate2DMake([dict[@"latitude"] doubleValue], [dict[@"longitude"] doubleValue]);
    }
    return self;
}

@end
